
#include "mainwindow.h"
#include "qutils.h"

#include <QApplication>
#include <QDebug>
#include <QMainWindow>

#include <screenutil.h>
#include <version.h>

int main(int argc, char *argv[])
{
//    QApplication::setAttribute(Qt::AA_DisableHighDpiScaling);

    QApplication a(argc, argv);
    a.setApplicationName("qgo-articles-client");
    a.setApplicationDisplayName("文章分析工具 - v" PROJECT_VERSION);
    a.setApplicationVersion(PROJECT_VERSION);

    if (QUtils::qsystem_semaphore_lock("文章分析工具", true) == false) {
        qDebug() << "Another instance is running, exiting...";
        return 0;
    }
    
    MainWindow wm;
    wm.show();
   
    ScreenUtil::moveCenterForCursor(wm);

    return a.exec();
}
